package com.jron.cqiu.kernel.regist;

import com.jron.cqiu.util.Instance;

import java.util.TreeMap;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-16
 * @Time: 15:43:34
 */
public interface IAutorun {

    /**
     *
     */
    static String AUTORUN_KEY = "Software\\Microsoft\\Windows\\CurrentVersion\\run";

    static String AUTORUN_NAME = "kingbyjronrun";

    /**
     * IAutorun 默认实现
     */
    IAutorun INSTANCE = Instance.AUTORUN_INSTANCE;

    /**
     * 检查自启动项是否存在
     *
     * @param name
     * @return
     */
    public boolean isExist(String name);

    /**
     * 增加自启动项
     *
     * @param name
     * @param value
     * @return
     */
    public boolean add(String name, String value);

    /**
     * 移除自启动项
     *
     * @param name
     * @return
     */
    public boolean del(String name);

    /**
     * 修改自启动项
     *
     * @param name
     * @param value
     * @return
     */
    public boolean modfiy(String name, String value);

    /**
     * 获取自启动项
     *
     * @param name
     * @return
     */
    public String view(String name);

    /**
     * 获取全部自启动项
     *
     * @return
     */
    public TreeMap<String, Object> viewAll();
}
